Skip to content

feat(docs): add a Broadcast guide eval - #563

Draft
czenko wants to merge 2 commits into
mainfrom
docs/broadcast-guide-eval
Draft

czenko wants to merge 2 commits into
mainfrom
docs/broadcast-guide-eval

Conversation

@czenko

@czenko czenko commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes DOCS-1657

Problem

Nothing measures whether the Broadcast guide leads an agent to messages that reach a room's members and nobody else. A database sends to a private channel that has no read policy, and the client never receives it. The common fix is a using (true) policy, which lets every signed-in user join every room.

Evidence:

The ticket's claim was "a broadcast message reaches subscribers". The evidence points at who is allowed to receive and send, so the eval measures delivery plus that boundary.

No existing eval covers Broadcast. build-docs-040, in review, covers Postgres Changes, a separate claim.

Sources reached: Linear, Slack, supabase/supabase, supabase/realtime and agent-skills issues. Not reached: Hex, Supacademy.

Changes

Adds build-docs-042-realtime-broadcast. A team chat shows new messages only on reload. The prompt asks for messages to appear live for everyone in the room, from the web app, the mobile app and the support inbox. Nobody outside a room may see its messages or slip one in, even by talking to Supabase directly. The seed fixes watchRoom in src/live.js and postMessage in src/messages.js. Its tables and membership helper already keep non-members out of the rows, so the eval measures only the live path.

The scorer installs the seed's locked dependencies with npm ci, plus its own pinned client outside the workspace. It sends a database test message first and waits for it. Then it calls the agent's watchRoom with signed-in clients, posts through all three sources with run-scoped bodies, and has an outsider and a visitor listen and forge on every topic the member joined.

Checks:

  • The agent applied the migrations it wrote, the scorer installed the app's locked dependencies, and the room screen can load watchRoom.
  • A room member sees a message from the mobile app, the support inbox, and the web app as soon as it is saved. Each note names the route that delivered it.
  • A signed-in person from another room never sees the room's messages.
  • A visitor who is not signed in never sees the room's messages.
  • A person from another room cannot slip a message into the room, through the table or a forged broadcast.
  • The agent read the Broadcast guide.

Expected signal: The page's own pieces together are a database trigger, a using (true) policy and a listener with no private: true. They fail the member checks, the outsider check and the forgery check. Adding private: true still fails the outsider check. A Postgres Changes route also passes, because the eval scores the outcome. The member notes record which route each run took.

What part of the guide this tests:

Guide section Tested How
Subscribe and receive Yes The member checks, through the agent's watchRoom
Broadcast from the database Yes, indirectly The member, outsider and forgery checks
Realtime authorization Yes The outsider and forgery checks, with private and public joins
Sending from the client, self, ack Partly The web app check runs the agent's postMessage
REST and httpSend Partly Used as a forgery route
Binary payloads, replay, billing No Out of scope

Verification

  • pnpm exec biome check evals/docs/build-docs-042-realtime-broadcast passes.
  • pnpm --filter @supabase-evals/framework typecheck passes.
  • pnpm eval:dry -- --suite docs --eval build-docs-042-realtime-broadcast plans one pair on codex-gpt-6-luna-no-skills.
  • First baseline, on 24a9a530: three runs of codex-gpt-6-luna-no-skills. One run passed all ten checks, delivered by broadcast. Two runs turned public channels off on the local Realtime tenant, a stricter and reasonable choice. The scorer's warm-up message went to a public topic, so it never arrived and six checks failed as could-not-measure. Both agents also ran out of time. Every run read the guide. Braintrust run.
  • Fix, in 053160d5: the warm-up message and the forgery control use a private run-scoped topic and a service-role listener. A refused public join counts as no leak and no forgery. A correct project with public channels off passes locally, and the page's pieces still fail.
  • Baseline on 053160d5: three runs. All three passed all ten checks, delivered by broadcast, including the guide read. A full-marks pass does not show the page carried the run. Braintrust run.

For new or changed evals (see Submitting evals for review):

  • Ran the eval locally, and it completes without framework errors.
  • Ran it in CI with the run-evals-changed label or the Refresh eval results workflow (suite: regression for framework changes), and linked the Braintrust run here.

@czenko czenko added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Nov 25, 2026
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
evals Ignored Ignored Preview Nov 25, 2026 9:31pm UTC

Request Review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant